#include <iostream>
#include <algorithm>
using namespace std;

const int N = 2e5 + 10;

typedef long long LL;
LL a[N];

int main()
{
	int T; cin >> T;
	while(T--)
	{
		LL sum = 0;
		int n; cin >> n;
		for(int i = 1; i <= 2 * n; i++) 
		{
			cin >> a[i]; sum += abs(a[i]);
		}
		if(n == 1) cout << min(abs(a[1] - a[2]), sum) << endl;
		else if(n == 2) 
		{
			LL ret1 = 0;
			for(int i = 1; i <= 4; i++) ret1 += abs(2 - a[i]);
			sort(a + 1, a + 1 + 4);
			LL ret2 = 0;
			int pos = 1, dist = 0x3f3f3f3f;
			for(int i = 1; i <= 2 * n; i++) 
			{
				if(abs(a[i] - n) < dist)
				{
					pos = i;
					dist = abs(a[i] - n);
				}
			}
			for(int i = 1; i <= 2 * n; i++)
			{
				if(i == pos) ret2 += dist;
				else ret2 += abs(a[i] + 1); 
			}
			cout << min(min(sum, ret1), ret2) << endl;
		}
		else
		{
			sort(a + 1, a + 1 + 2 * n);
			LL ret = 0;
			int pos = 1, dist = 0x3f3f3f3f;
			for(int i = 1; i <= 2 * n; i++) 
			{
				if(abs(a[i] - n) < dist)
				{
					pos = i;
					dist = abs(a[i] - n);
				}
			}
			for(int i = 1; i <= 2 * n; i++)
			{
				if(i == pos) ret += dist;
				else ret += abs(a[i] + 1); 
			}
			cout << min(ret, sum) << endl;
		}
		
	}
	return 0;
}
